<template>
  <div id="baseapp">
    <div id="nav">
      <!-- 切换显示不同的微应用: 主应用路由需要时history模式 -->
      <router-link to="/vueapp1">微应用1</router-link> |
      <router-link to="/vueapp2/about">微应用2</router-link> |
      <router-link to="/reactapp1">微应用3</router-link>
    </div>
    <router-view />

    <!-- 微应用1容器 -->
    <div id="sub-vueapp1"></div>

    <!-- 微应用2容器 -->
    <div id="sub-vueapp2"></div>

    <!-- 微应用3容器 -->
    <div id="sub-reactapp1"></div>
  </div>
</template>

<style>
#baseapp {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}
#sub-vueapp1 {
  border: solid 1px black;
}
#sub-vueapp2 {
  border: solid 1px red;
}

#nav {
  padding: 30px;
}

#nav a {
  font-weight: bold;
  color: #2c3e50;
}

#nav a.router-link-exact-active {
  color: #42b983;
}
</style>
